package com.nbsaas.boot.project.data.entity;

import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.boot.jpa.data.entity.LongEntity;
import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.*;


@ComposeView
@org.hibernate.annotations.Table(appliesTo = "bs_data_model", comment = "数据模型")
@Data
@FormAnnotation(model = "数据模型")
@Entity
@Table(name = "bs_data_model")
public class DataModel extends LongEntity {

    @FieldName
    @FieldConvert
    @ManyToOne(fetch = FetchType.LAZY)
    private Project project;

    @SearchItem(label = "模型名称", name = "name")
    @Comment("模型名称")
    @FormField(title = "模型名称",  grid = true, width = "200")
    @Column(length = 30)
    private String name;


    @Comment("模型介绍")
    @FormField(title = "模型介绍", grid = true, type = InputType.textarea)
    private String note;
}
